from appium.webdriver.common.mobileby import MobileBy
from appium.webdriver.webdriver import WebDriver

from appium0704.appiumpo.AddMemberPage import AddMemberPage
from appium0704.appiumpo.BasePage import BasePage


class ContactPage(BasePage):

    def goto_AddMember(self):
        #click 点击添加成员
        self.driver.find_element(MobileBy.ANDROID_UIAUTOMATOR,
                                 'new UiScrollable(new UiSelector().scrollable(true).\
                                 instance(0)).scrollIntoView(new UiSelector().\
                                 text("添加成员").instance(0));').click()

        return AddMemberPage(self.driver)
